<template>
  <div id="app">
    <Header @openNotice="openNotice" ></Header>
    <Notice v-if="isShowNotice" @offNotice="offNotice" ></Notice>
    
  </div>
</template>

<script>
import Header from "./components/Header"
import Notice from "./view/Notice"



export default {
  name: 'App',
  components: {
   Header,
   Notice,
  },
  data() {
    return {
      isShowNotice:false,
    };
  },
  watch: {
    $route(e) {
      if(e.name === "Goods"){
        this.show = true;
      }else{
        this.show = false;
      }
    }
  },
  methods:{
    offNotice(){
      this.isShowNotice = false;
    },
    openNotice(){
      this.isShowNotice = true;
    }
  }
}
</script>

<style>

</style>
